package com.XDApp.xdbase.fragment;

import com.XDApp.xdbase.R;
import com.XDApp.xdbase.activitys.MyListActivity;
import com.XDApp.xdbase.activitys.SettingActivity;
import com.XDApp.xdbase.activitys.MyShareActivity;
import com.XDApp.xdbase.utils.Logger;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

public class SettingFragment extends XDBaseFragment implements OnClickListener {

	 private static final String TAG = "SettingFragment";
	private View inflate;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		inflate = inflater.inflate(R.layout.fragment_setting, container, false);
		return inflate;
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {

		inflate.findViewById(R.id.rel_setting).setOnClickListener(this);
		inflate.findViewById(R.id.rel_share).setOnClickListener(this);
		
		super.onActivityCreated(savedInstanceState);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.rel_setting:
			Intent intent = new Intent(mContext, SettingActivity.class);
			startActivity(intent);
			break;
		case R.id.rel_share:
			Logger.i(TAG, "进入分享");
			Intent intent2 = new Intent(mContext, MyShareActivity.class);
			startActivity(intent2);
			break;
		default:
			Logger.i(TAG, "default");
			Intent intent3 = new Intent(mContext, MyShareActivity.class);
			startActivity(intent3);
			break;
		}	
	}

}
